#ifndef __PRINT_TASK_H__
#define __PRINT_TASK_H__
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <linux/getprocinfo.h>

#define getprocinfo(arg1, arg2) syscall(300, arg1, arg2)

int print_task(struct proc_info_struct* s) {
  perror("getprocinfo outcome");
  printf("\n\nProc Info Struct: \n");
  printf("pid: %lu\n", (long)s->pid);
  printf("gid: %lu\n", (long)s->gid);
  printf("ppid: %lu\n", (long)s->parn_pid);
  printf("user_time: %lu\n", (long)s->user_time);
  printf("sys_time: %lu\n", s->sys_time);
  printf("state: %ld\n", s->state);
  printf("avg:   %llu\n", s->sched_avg_running);
  printf("time slice: %u\n", s->time_slice);
  printf("policy: %u\n", s->policy);
  printf("num cxs: %lu\n", s->num_cxs);
  printf("num children: %d\n", s->num_children);
  printf("program: %s\n", s->prog);

  return 0;
}

#endif
